<?php $this->load->view('home/layout/header') ?>
<header class="my-head flex">
    <div class="my-return">
        <a href="javascript:goHistoryBack();">
            <i class="iconfont icon-zuojiantou"></i>
        </a>
    </div>
    <div class="my-name">
        客服中心
    </div>
</header>
<section class="help-text widthMax">
    <div class="help-head flex flex-align-center flex-pack-center">
        <div class="help-xs">
            <img src="<?php echo $service->wap_image ? $this->config->show_image_url($service->wap_image) : 'skins/home/images/help_sevice.jpg' ?>">
            <!-- <p><?php echo $service->name; ?></p> -->
        </div>
    </div>
    <ul class="help-ul">
        <?php if ($service->service_mobile) : ?>
        <li>
            <div class="help-a flex">
                <p class="flex-1">客服电话</p>
                <div class="help-bug flex">
                    <a href="tel:<?php echo $service->service_mobile ?: '13757184909'; ?>" class="bug-text flex-1">
                        <?php echo $service->service_mobile ?: '13757184909'; ?>
                    </a>
                    <i class="iconfont icon-youjiantou"></i>
                </div>
            </div>
        </li>
        <?php endif; ?>
    </ul>
    <div class="service-call flex">
        <div class="service-wx-ewm flex-1">
            <a href="weixin://profile/<?php echo $service->service_wx; ?>">
                <img src="<?php echo $service->service_wx ? $this->config->show_image_url($service->service_wx) : '/skins/home/images/help-service-qrcode.jpg'; ?>">
            </a>
            <div class="service-know-text">长按识别微信二维码</div>
        </div>
        <?php if ($service->service_qq) : ?>
        <div class="service-qq-link">
            <dl>
                <?php foreach (explode(',', $service->service_qq) as $key => $value) : ?>
                <dd>
                    <span>客服<?php echo ($key + 1) ?></span>
                    <a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=<?php echo $value ?>&site=qq&menu=yes">
                        <img border="0" src="http://wpa.qq.com/pa?p=2:807968201:51"/>
                    </a>
                </dd>
                <?php endforeach; ?>
            </dl>
            <div class="service-know-text">点击按钮在线咨询客服</div>
        </div>
        <?php endif; ?>
    </div>
    <?php if ($help_issue->num_rows() > 0) : ?>
        <div class="help-issue-list">
            <div class="title-info">常见问题</div>
            <ul class="help-issue">
                <?php foreach ($help_issue->result() as $key => $item) : ?>
                <li <?php echo $key == 0 ? 'class="active"' : '' ?>>
                    <div class="title flex">
                        <p class="flex-1">· <?php echo $item->issue_title ?></p>
                        <div class="help-bug flex">
                            <i class="iconfont icon-youjiantou"></i>
                        </div>
                    </div>
                    <div class="content">
                        <?php echo $item->issue_answer ?>
                    </div>
                </li>
                <?php endforeach; ?>
            </ul>
        </div>
    <?php endif; ?>
</section>
<?php $this->load->view('home/layout/footer') ?>
<script type="text/javascript">
    $('.help-issue').on('click', '.title', function (e) {
        var parent = $(this).parent();
        if (parent.hasClass('active')) {
            parent.removeClass('active');
        } else {
            parent.addClass('active').siblings().removeClass('active');
        }
    });
</script>
